//处理用户登录逻辑
const db=require("../lib/db")
function userLogin(username,userpwd){
console.log(username,userpwd)
let sql="select * from login where userName='"+username+"'";
db.querysql(sql).then(data=>{
    console.log(data)
    if(data.length==0){
        console.log("用户不存在")
    }else{
        if(data[0].userPassword==userpwd){
            console.log("登录成功")
        }else{
            console.log("密码错误")
        }
    }
})
}

module.exports=userLogin